<template>
	<view>
		<view class="top-view">
			<uni-nav-bar :statusBar="true" title="陕西健康科普资源库" backgroundColor="transparent" color="white" :shadow="false" :border="false" />
			<view class="search-view">
				<view class="input-view" @click="searchJust()">
					<uni-icons type="search" size="25" color="#CCCCCC"></uni-icons>
					<input placeholder="请输入需要搜索的信息" />
				</view>
			</view>
			<view class="bottom-view">
				<view class="left">
					<view class="big-title">健康陕西行动</view>
					<view class="middle-title">共享健康·全民健康</view>
					<!-- <view class="bottom-title">点击查看详情</view> -->
				</view>
				<view class="right">
					<image src="../../static/img/index_qrcode.png"></image>
				</view>
			</view>
		</view>
		<view class="grid-menu-view">
			<uni-grid :column="4" :showBorder="false" :square="false" :highlight="false" @change="onGridItemClick">
				<uni-grid-item :index="index" v-for="(item,index) in gridMenuList" :key="index">
					<view class="grid-item">
						<view class="icon-view">
							<image :src="item.icon" mode="aspectFit"></image>
						</view>
						<text class="text">{{item.title}}</text>
					</view>
				</uni-grid-item>
			</uni-grid>
		</view>

		<view class="page-card-view">
			<view class="card-title">
				<view class="title">头条资讯</view>
				<view class="more-btn" @click="navToTopNewsList('头条资讯')">
					查看更多
					<uni-icons type="forward" size="20"></uni-icons>
				</view>
			</view>
			<view class="card-list-view">
				<view class="card-list-item" v-for="(item,index) in headlineList" @click="goDetails(item)" :key="index">
					<image class="card-list-image" :src="item.coverFileName"></image>
					<view class="right-view">
						<view class="title-and-date">
							<view class="title singe-line-ellipsis">{{item.titleName}}</view>
							<view class="date">{{item.createTime}}</view>
						</view>
						<view class="content-view double-line-ellipsis">{{item.subtitle||''}}</view>
					</view>
				</view>
			</view>
		</view>

		<view class="page-card-view">
			<view class="card-title">
				<view class="title">健康陕西</view>
				<view class="more-btn" @click="navToHealthyShaanxi('健康陕西')">
					查看更多
					<uni-icons type="forward" size="20"></uni-icons>
				</view>
			</view>
			<view class="video-list-view">
				<view class="video-list-item" v-for="item in healthyShaanxiList" :key="item.uid"
					@click="goDetails(item)">
					<view class="cover-view">
						<image :src="item.coverFileName" mode="aspectFill" class="cover-image"></image>
						<view class="play-icon">
							<view class="play-icon-inner"></view>
						</view>
					</view>
					<view class="bottom-view">
						<view class="title-and-date">
							<view class="title singe-line-ellipsis">{{item.titleName}}</view>
							<view class="date">{{item.createTime}}</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="page-card-view">
			<view class="card-title">
				<view class="title">百姓健康栏目</view>
				<view class="more-btn" @click="navTopPeopleHealth('百姓健康栏目')">
					查看更多
					<uni-icons type="forward" size="20"></uni-icons>
				</view>
			</view>
			<view class="card-list-view">
				<view class="card-list-item" v-for="(item,index) in popularHealthList" :key="index" @click="goHealthDetails(item)">
					<image class="card-list-image" :src="item.coverFileName"></image>
					<view class="right-view">
						<view class="title-and-date">
							<view class="title singe-line-ellipsis">{{item.titleName}}</view>
							<view class="date">{{item.createTime}}</view>
						</view>
						<view class="content-view double-line-ellipsis">{{item.subtitle||''}}</view>
					</view>
				</view>
			</view>
		</view>


		<view class="page-card-view">
			<view class="card-title">
				<view class="title">电视节目</view>
				<view class="more-btn" @click="navToTopNewsList('电视')">
					查看更多
					<uni-icons type="forward" size="20"></uni-icons>
				</view>
			</view>
			<view class="video-list-view">
				<view class="video-list-item" v-for="item in televisionList" :key="item.uid" @click="goDetails(item)">
					<view class="cover-view">
						<image :src="item.coverFileName" mode="aspectFill" class="cover-image"></image>
						<view class="play-icon">
							<view class="play-icon-inner"></view>
						</view>
					</view>
					<view class="bottom-view">
						<view class="title-and-date">
							<view class="title singe-line-ellipsis">{{item.titleName}}</view>
							<view class="date">{{item.createTime}}</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="page-card-view">
			<view class="card-title">
				<view class="title">广播</view>
				<view class="more-btn" @click="navToTopNewsList('广播')">
					查看更多
					<uni-icons type="forward" size="20"></uni-icons>
				</view>
			</view>
			<view class="broadcast-view">
				<view class="broadcast-item" v-for="item in broadcastList" :key="item.uid" @click="goDetails(item)">
					<image class="icon" src="../../static/img/guang_bo_icon.png"></image>
					<view class="title">{{item.titleName}}</view>
					<view class="date">{{item.createTime}}</view>
				</view>
			</view>
		</view>
		
		<view class="page-card-view">
			<view class="card-title">
				<view class="title">新媒体</view>
				<!-- 	<view class="more-btn">
					查看更多 
					<uni-icons type="forward" size="20"></uni-icons>
				</view> -->
			</view>
			<view class="new-media-view">
				<view class="new-media-item" v-for="item in newMediaList" :key="item.uid">
					<view class="img-view">
						<image class="img" :src="item.fileName"></image>
					</view>
					<view class="title">{{item.wxName}}</view>
				</view>
			</view>
		</view>
		<healthKnowledge></healthKnowledge>
		<popularization></popularization>
		<publicity></publicity>
	</view>
</template>

<script>
	import * as loginUtils from '../../utils/loginUtils.js'
	import * as queryData from '../../common/api/index.js'
	import publicity from './publicity.vue'
	import popularization from './popularization.vue'
	import healthKnowledge from './healthKnowledge.vue'
	import {baseUrl} from '../../common/config.js'
	
	export default {
		components: {
			publicity,
			popularization,
			healthKnowledge
		},
		data() {
			return {
				gridMenuList: [{
						title: '头条资讯',
						icon: '/static/img/tou_tiao_zi_xun.png',
						url: '/pages/topNewsList/topNewsList'
					},
					{
						title: '健康陕西',
						icon: '/static/img/jian_kang_shan_xi.png',
						url: '/pages/healthyShaanxiList/healthyShaanxiList'
					},
					{
						title: '百姓健康系列栏目',
						icon: '/static/img/bai_xing_jian_kang_xi_lie_lan_mu.png'
					},
					{
						title: '健康知识',
						icon: '/static/img/jian_kang_zhi_shi.png'
					},
					{
						title: '科普资料',
						icon: '/static/img/ke_pu_zi_liao.png'
					},
					{
						title: '宣传活动',
						icon: '/static/img/xuan_chuan_zhi_shi.png'
					},
          {
          	title: '中医健康科普',
          	icon: '/static/icon/jkkp.png',
            url:'http://saas.100xsys.cn:9102/xmp/#/views/custom/index/index?page_no=PG2410140005&srvApp=config'
          },
          {
          	title: '健康评测',
          	icon: '/static/icon/jkpc.png',
            url:'http://saas.100xsys.cn:9102/xmp/#/views/custom/index/index?page_no=PG2410120012&srvApp=config'
          },
          // {
          //   title: '健康评测',
          //   url: 'https://saas.100xsys.cn/health/pages/customIndex/customIndex?no=BX202102191700520031',
          //   icon: '/static/img/tou_tiao_zi_xun.png'
          // },
          // {
          //   title: '慢病风险评估',
          //   url: 'https://saas.100xsys.cn/health/pages/customIndex/customIndex?no=BX202406251802240001',
          //   icon: '/static/img/tou_tiao_zi_xun.png'
          // },
          // {
          //   title: '食品药品指引',
          //   url: 'https://saas.100xsys.cn/health/pages/customIndex/customIndex?no=BX202406251821560002',
          //   icon: '/static/img/tou_tiao_zi_xun.png'
          // },
          // {
          //   title: '就医康复指引',
          //   url: 'https://saas.100xsys.cn/health/otherPages/symptomSelect/symptomSelect2',
          //   icon: '/static/img/tou_tiao_zi_xun.png'
          // }, {
          //   title: '中医历史文化',
          //   url: 'https://saas.100xsys.cn/health/otherPages/newsList/newsList?classifyName=中医历史与文化',
          //   icon: '/static/img/tou_tiao_zi_xun.png'
          // },
          // {
          //   title: '中医健康科普专家',
          //   url: 'https://saas.100xsys.cn/health/otherPages/newsList/newsList?classifyName=中医健康科普专家',
          //   icon: '/static/img/tou_tiao_zi_xun.png'
          // },
          // {
          //   title: '满意度调查',
          //   url: 'https://saas.100xsys.cn/health/questionnaire/index/index?formType=form&activity_no=20240624105711000001&status=%E8%BF%9B%E8%A1%8C%E4%B8%AD',
          //   icon: '/static/img/tou_tiao_zi_xun.png'
          // }
					// ,
					// {
					// 	title: '直播',
					// 	icon: '/static/img/zhi_bo.png'
					// }
				],
				popularHealthTabs: [{
					name: '陕西日报',
					uid: '025cfacafd3b42e38ef91f6a0b5bde30'
				}, {
					name: '三秦百姓健康',
					uid: '8c5dccb2f8d94657bdb4b69b938b66bf'
				}, {
					name: '陕西老年健康报',
					uid: 'b6be5556f2884fbcb1447ffd69a1fefe'
				}],
				popularHealthTabCurrent: 0,
				subTabScrollLeft: 0,
				headlineList: [],
				healthyShaanxiList: [],
				popularHealthList: [],
				televisionList: [],
				broadcastList: [],
				newMediaList: [],
			}
		},
		onLoad(){
			if(!uni.getStorageSync('openid_key')){
				loginUtils.login(baseUrl+'/member/memberLogin',() => {})
			}
		},
		methods: {
			searchJust(){
				uni.navigateTo({
					url: "/pages/search/search"
				})
			},
			getGridMenuBackground(colorTop, colorBottom) {
				return {
					background: `linear-gradient(to bottom,${colorTop},${colorBottom})`
				}
			},
			changePopularHealthTab(e) {
				this.popularHealthTabCurrent = e
				this.getpopularHealthList()
			},

			onGridItemClick(e) {
				const item = this.gridMenuList[e.detail.index]
        if(item.url&&item.url?.indexOf('http')===0){
          // #ifdef MP
          uni.navigateTo({
            url:'/pages/webview/webview?url='+encodeURIComponent(item.url)
          })
          // #endif
          // #ifdef H5
          window.location.href = item.url
          // #endif
        }else if (item.title === '宣传活动') {
					uni.navigateTo({
						url: "/pages/publicity/publicity"
					})
				} else if (item.title === '科普资料') {
					uni.navigateTo({
						url: "/pages/popularization/popularization"
					})
				} else if (item.title === '健康知识') {
					uni.navigateTo({
						url: "/pages/healthKnowledge/healthKnowledge"
					})
				} else if (item.title === '百姓健康系列栏目') {
					this.navTopPeopleHealth()
				} else if (item.title === '健康陕西') {
					this.navToHealthyShaanxi()
				} else {
					this.navToTopNewsList(item.title)
				}

			},
			navToTopNewsList(e) {
				uni.navigateTo({
					url: "/pages/topNewsList/topNewsList?classifyName=" + e
				})
			},
			navToHealthyShaanxi() {
				uni.navigateTo({
					url: "/pages/healthyShaanxiList/healthyShaanxiList"
				})
			},
			navTopPeopleHealth() {
				uni.navigateTo({
					url: "/pages/peopleHealthList/peopleHealthList"
				})
			},
			goHealthDetails(data) {
				let item = this.popularHealthTabs[this.popularHealthTabCurrent]
				if (item.name === '陕西日报') {
					this.goDetails(data)
				} else {
					uni.navigateTo({
						url: "/pages/pdfView/pdfView?uid=" + data.uid
					})
				}
			},
			goDetails(data) {
				uni.navigateTo({
					url: "/pages/details/details?uid=" + data.uid
				})
			},
			getHeadlineList() {
				const param = {
					pageIndex: 1,
					pageSize: 3,
					positionsOne: '首页'
				}
				queryData.queryTop(param).then(res => {
					this.headlineList = res.data.data.rows
				}).catch(error => {
					console.log(error)
				})
			},
			gethealthyShaanxiList() {
				const param = {
					pageIndex: 1,
					pageSize: 3,
					positionsOne: '首页',
					classifyUid: '1d664d998e9a439ea5dda15e8f9562aa'
				}
				queryData.queryByPage(param).then(res => {
					this.healthyShaanxiList = res.data.data.rows
				}).catch(error => {
					console.log(error)
				})
			},
			getpopularHealthList() {
				let item = this.popularHealthTabs[this.popularHealthTabCurrent]
				const param = {
					pageIndex: 1,
					pageSize: 3,
					positionsOne: '首页',
					classifyUid: item.uid
				}
				queryData.queryByPage(param).then(res => {
					this.popularHealthList = res.data.data.rows
				}).catch(error => {
					console.log(error)
				})
			},
			getTelevisionList() {
				const param = {
					pageIndex: 1,
					pageSize: 3,
					positionsOne: '首页',
					classifyUid: '959930f21ddf443d9694a1b79168da4a'
				}
				queryData.queryByPage(param).then(res => {
					this.televisionList = res.data.data.rows
				}).catch(error => {
					console.log(error)
				})
			},
			getBroadcastList() {
				const param = {
					pageIndex: 1,
					pageSize: 3,
					positionsOne: '首页',
					classifyUid: 'fa6b29bca3fa47a2919df7bc1b30b992'
				}
				queryData.queryByPage(param).then(res => {
					this.broadcastList = res.data.data.rows
				}).catch(error => {
					console.log(error)
				})
			},
			getNewMedia() {
				const param = {}
				queryData.queryNewMedia(param).then(res => {
					this.newMediaList = res.data.data.rows
				}).catch(error => {
					console.log(error)
				})
			},
			// 登录
			memberLogin(){
				if(uni.getStorageSync('openid_key')){
					queryData.memberLogin().then(res => {
						// console.log("memberLogin",res.data.data)
					})
				}
			}
		},
		onShow() {
			if(!uni.getStorageSync('openid_key')){
				loginUtils.login(baseUrl+'/member/memberLogin',() => {})
				this.memberLogin();
			}
			this.getHeadlineList()
			this.gethealthyShaanxiList()
			this.getpopularHealthList()
			this.getTelevisionList()
			this.getBroadcastList()
			this.getNewMedia()
		}
	}
</script>

<style lang="scss" scoped>
	.top-view {
		width: 100%;
		height: 684rpx;
		background: linear-gradient(to bottom, #62C6AA, #C1E9DE, #FFFFFF);
		display: flex;
		flex-direction: column;
		align-items: center;

		.search-view {
			display: block;
			width: 100%;
			height: 70rpx;
			width: calc(100% - 60rpx);
			border-radius: 44rpx;
			display: flex;
			overflow: hidden;
			gap: 10rpx;
			margin-top: 30rpx;
			box-sizing: border-box;
			border: solid 1rpx white;

			.input-view {
				width: 100%;
				background: rgba(255, 255, 255, 0.50);
				display: flex;
				align-items: center;
				padding-left: 30rpx;

				input {
					margin-left: 10rpx;
					margin-right: 10rpx;
					font-size: 22rpx;
					width: 100%;
				}

				input::placeholder {
					color: #33B692 !important;
				}
			}
		}

		.bottom-view {
			width: 100%;
			display: flex;
			margin-top: 30rpx;
			margin-left: 100rpx;
			justify-content: space-around;

			.left {
				display: flex;
				flex-direction: column;
				align-items: flex-start;

				.big-title {
					font-size: 42rpx;
					color: #31B38F;
				}

				.middle-title {
					font-size: 24rpx;
					font-weight: bold;
					color: #27A280;
					margin-top: 30rpx;
				}

				.bottom-title {
					width: auto;
					font-size: 24rpx;
					margin-top: 30rpx;
					color: white;
					background: #32B490;
					padding: 10rpx 30rpx;
					border-radius: 30rpx;
				}
			}

			.right {
				display: flex;
				align-items: flex-start;

				image {
					width: 324rpx;
					height: 293rpx;
				}
			}
		}

	}

	.grid-menu-view {
		width: 100%;
		background: white;
		padding-top: 30rpx;
		padding-bottom: 30rpx;
		margin-top: -170rpx;
		border-top-left-radius: 100rpx;
		position: relative;

		&::after {
			content: '';
			position: absolute;
			right: 0;
			top: -40px;
			width: 70px;
			height: 40px;
			background-image: radial-gradient(80px at 0px -40px, transparent 100px, white 0px);
		}

		.grid-item {
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			padding: 10rpx;
		}

		.icon-view {
			width: 90rpx;
			height: 90rpx;
			border-radius: 36rpx;
			display: flex;
			align-items: center;
			justify-content: center;

			image {
				width: 80rpx;
				height: 80rpx;
			}
		}
    .text {
      font-size: 24rpx;
      color: #383838;
      font-weight: bold;
      word-break: keep-all;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      width: 100%;
      text-align: center;
    }
	}

	.page-card-view {
		width: 100%;
		display: flex;
		flex-direction: column;
		background: white;

		.card-title {
			width: 100%;
			display: flex;
			padding: 30rpx;
			box-sizing: border-box;
			align-items: center;

			.title {
				font-size: 32rpx;
				font-weight: bold;
				color: #383838;
				flex: 1;
			}

			.more-btn {
				display: flex;
				font-size: 24rpx;
				color: #808080;
			}
		}
	}

	.card-list-view {
		width: 100%;
		padding: 10rpx 30rpx;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;

		.card-list-item {
			width: 100%;
			background: white;
			display: flex;
			padding: 20rpx;
			box-sizing: border-box;
			border-radius: 10rpx;
			box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.08);
			margin-bottom: 20rpx;

			.card-list-image {
				width: 120rpx;
				height: 120rpx;
				border-radius: 12rpx;
			}

			.right-view {
				width: 500rpx;
				display: flex;
				flex-direction: column;
				margin-left: 20rpx;

				.title-and-date {
					width: 100%;
					display: flex;
					justify-content: space-between;

					.title {
						width: 370rpx;
						font-size: 24rpx;
						color: #383838;
					}

					.date {
						width: 120rpx;
						font-size: 20rpx;
						color: #808080;
					}
				}

				.content-view {
					color: #A6A6A6;
					font-size: 18rpx;
				}
			}
		}
	}

	.video-list-view {
		width: 100%;
		padding: 10rpx 30rpx;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;

		.video-list-item {
			width: 100%;
			display: flex;
			flex-direction: column;
			background: white;
			border-radius: 10rpx;
			box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.08);
			overflow: hidden;
			margin-bottom: 20rpx;

			.cover-view {
				width: 100%;
				height: 300rpx;
				display: flex;
				justify-content: center;
				align-items: center;
				position: relative;

				.cover-image {
					width: 100%;
					height: 300rpx;
					position: absolute;
				}

				.play-icon {
					width: 48rpx;
					height: 48rpx;
					background: rgba(89, 89, 89, 0.5);
					z-index: 1;
					border-radius: 50%;
					display: flex;
					align-items: center;
					justify-content: center;

					.play-icon-inner {
						width: 0;
						height: 0;
						border-left: 18rpx solid #2C2C2C;
						border-top: 12rpx solid transparent;
						border-bottom: 12rpx solid transparent;
						margin-left: 5rpx;
					}
				}
			}

			.bottom-view {
				width: 100%;
				box-sizing: border-box;
				padding: 10rpx 30rpx;

				.title-and-date {
					width: 100%;
					display: flex;
					justify-content: space-between;

					.title {
						width: 480rpx;
						font-size: 24rpx;
						color: #303133;
						font-weight: bold;
						text-overflow: ellipsis;
						overflow: hidden;
						word-break: break-all;
						white-space: nowrap;
					}

					.date {
						font-size: 18rpx;
						color: #303133;
					}
				}

				.content-view {
					color: #303133;
					font-size: 18rpx;
				}

				.view-and-favorite {
					display: flex;
					color: #A6A6A6;
					font-size: 20rpx;

					image {
						width: 20rpx;
						height: 20rpx;
					}

					.view {
						display: flex;
						align-items: center;
					}

					.favorite {
						display: flex;
						margin-left: 20rpx;
						align-items: center;
					}

					.text {
						margin-left: 10rpx;
					}
				}
			}


		}
	}

	// .people-health-view {
	// 	width: 100%;
	// 	padding: 10rpx 30rpx;
	// 	box-sizing: border-box;
	// 	display: flex;

	// 	.left {
	// 		width: 336rpx;
	// 		height: 318rpx;
	// 		position: relative;
	// 		display: flex;
	// 		flex-direction: column;

	// 		.zhi-bo-bg {
	// 			width: 100%;
	// 			height: 100%;
	// 			position: absolute;
	// 		}

	// 		.top-title-view {
	// 			width: 100%;
	// 			height: 120rpx;
	// 			display: flex;
	// 			flex-direction: column;
	// 			align-items: flex-end;
	// 			justify-content: center;

	// 			.title-row {
	// 				display: flex;
	// 				align-items: center;
	// 				margin-right: 20rpx;

	// 				.zhi-bo-icon {
	// 					width: 32rpx;
	// 					height: 32rpx;
	// 				}

	// 				.title {
	// 					color: #383838;
	// 					font-size: 20rpx;
	// 					font-weight: bold;
	// 					margin-left: 10rpx;
	// 				}

	// 			}

	// 			.sub-title {
	// 				margin-right: 20rpx;
	// 				color: #A6A6A6;
	// 				font-size: 18rpx;
	// 			}

	// 		}

	// 		.bottom-item {
	// 			width: 100%;
	// 			flex: 1;
	// 			margin-top: 20rpx;
	// 			background: #82CBA2;
	// 			border-radius: 10rpx;
	// 			overflow: hidden;
	// 			position: relative;

	// 			.title {
	// 				position: absolute;
	// 				top: 20rpx;
	// 				left: 140rpx;
	// 				color: white;
	// 				font-size: 20rpx;
	// 				font-weight: bold;
	// 			}

	// 			.sub-title {
	// 				position: absolute;
	// 				top: 50rpx;
	// 				left: 140rpx;
	// 				color: white;
	// 				font-size: 14rpx;
	// 				word-break: keep-all;
	// 			}

	// 			.icon {
	// 				position: absolute;
	// 				width: 22rpx;
	// 				height: 22rpx;
	// 				top: 80rpx;
	// 				left: 180rpx;
	// 			}

	// 			.bg-img {
	// 				position: absolute;
	// 				width: 146rpx;
	// 				height: 140rpx;
	// 				left: 0;
	// 				bottom: 0;
	// 			}
	// 		}
	// 	}
	.people-health {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;

	}

	.right {
		display: flex;
		flex-direction: column;
		flex: 1;
		margin-left: 10rpx;

		.top-item {
			width: 100%;
			height: 100%;
			background: #EAF4FF;
			border-radius: 10rpx;
			overflow: hidden;
			position: relative;

			.title {
				position: absolute;
				top: 20rpx;
				left: 20rpx;
				color: #383838;
				font-size: 20rpx;
				font-weight: bold;
			}

			.icon {
				position: absolute;
				width: 22rpx;
				height: 22rpx;
				top: 79rpx;
				left: 34rpx;
			}

			.bg-img {
				position: absolute;
				width: 146rpx;
				height: 140rpx;
				right: 0;
				top: 9rpx;
			}
		}

		.bottom-item {
			width: 100%;
			height: 100%;
			margin-top: 20rpx;
			background: #E5F6FF;
			border-radius: 10rpx;
			overflow: hidden;
			position: relative;

			.title {
				position: absolute;
				top: 20rpx;
				left: 180rpx;
				color: #383838;
				font-size: 20rpx;
				font-weight: bold;
			}

			.icon {
				position: absolute;
				width: 22rpx;
				height: 22rpx;
				top: 80rpx;
				left: 180rpx;
			}

			.bg-img {
				position: absolute;
				width: 146rpx;
				height: 140rpx;
				left: 0;
				bottom: 0;
			}
		}
	}

	.newspaper-view {
		width: 100%;
		padding: 10rpx 30rpx;
		box-sizing: border-box;
		display: grid;
		grid-template-columns: repeat(auto-fit, calc(100% / 2 - 20rpx));
		grid-template-rows: repeat(auto-fit, 280rpx);
		grid-row-gap: 20rpx;
		grid-column-gap: 20rpx;

		.newspaper-item {
			width: 100%;
			height: 100%;
			display: flex;
			flex-direction: column;
			border-radius: 10rpx;
			overflow: hidden;
			background: white;
			box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.08);

			.cover-img {
				width: 100%;
				height: 230rpx;
			}

			.title-and-date {
				display: flex;
				align-items: center;
				justify-content: space-around;

				.title {
					font-size: 24rpx;
					color: #303133;
					font-weight: bold;
				}

				.date {
					font-size: 20rpx;
					color: #808080;
				}
			}
		}
	}


	.broadcast-view {
		width: 100%;
		padding: 10rpx 30rpx;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;

		.broadcast-item {
			display: flex;
			align-items: center;
			border-bottom: solid 1rpx #E2E2E2;
			padding: 20rpx 0rpx;
			justify-content: space-between;

			.icon {
				width: 32rpx;
				height: 30rpx;
			}

			.title {
				font-size: 24rpx;
				font-weight: bold;
				color: #303133;
				margin-left: 10rpx;
				width: 500rpx;
				text-overflow: ellipsis;
				overflow: hidden;
				word-break: break-all;
				white-space: nowrap;
			}

			.date {
				color: #808080;
				font-size: 20rpx;
			}
		}
	}



	.new-media-view {
		width: 100%;
		padding: 10rpx 30rpx;
		box-sizing: border-box;
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;

		.new-media-item {
			.img-view {
				width: 300rpx;
				height: 300rpx;
				border-radius: 10rpx;
				overflow: hidden;
				background: white;
				box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.08);

				.img {
					width: 100%;
					height: 100%;
				}
			}

			.title {
				width: 100%;
				color: #303133;
				font-size: 30rpx;
				margin-top: 20rpx;
				text-align: center;
			}
		}
	}

	.tab-view {
		width: 100%;
		padding: 10rpx 30rpx;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;

		.grid-tab-view {
			width: 100%;
			display: grid;
			grid-template-columns: repeat(auto-fit, calc(100% / 3 - 20rpx));
			grid-column-gap: 20rpx;
			grid-row-gap: 20rpx;

			.grid-tab-item {
				width: 100%;
				height: 60rpx;
				border-radius: 10rpx;
				background: rgba(48, 177, 141, 0.05);
				display: flex;
				align-items: center;
				justify-content: space-around;

				.icon {
					width: 32rpx;
					height: 32rpx;
				}

				.title {
					font-size: 24rpx;
					color: #30B18D;
				}
			}

			.grid-tab-item-selected {
				background: #30B18D;

				.title {
					color: white;
				}
			}
		}
	}
</style>